<template lang="html">
  <section class="components-coach_detail_info" v-if="coachDetail">
    <h1 class="info-title">导师介绍</h1>
    <div class="info-content clearfix">
      <div class="content-portraitBlock">
        <div class="portraitBlock-wrap">
          <!-- <progressive-img fullMode :src="_PREFIX_ + 'zp-test-banner-5.jpg'"/> -->
          <progressive-img fullMode :src="coachDetail.coachAvatar"/>
        </div>
        <p>{{coachDetail.coachName}}</p>
      </div>
      <p class="content-coachIntro">
        {{isFull ? coachDetail.description : coachDetail.description.slice(0,50)}}
        <i class="ic-more" v-show="!isFull" @click="isFull = true"></i>
      </p>
    </div>
    <div class="info-action" v-show="isFull" @click="isFull = false">
      <i class="ic-category-more"></i>
    </div>
  </section>
</template>

<script>
export default {
  props: {
    coachDetail: {
      type: Object
    }
  },
  data(){
    return {
      isFull: false
    }
  }
}
</script>

<style lang="scss" scoped>
@import "../css/config";
$portrait-width: 245px;
.components-coach_detail_info{
  position: relative;
  width: 691px;
  box-sizing: border-box;
  padding: 25px 28px 20px 64px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 15px;
  margin: -61px auto 0;
  z-index: 1;
  box-shadow: 0px 4px 15px 0px rgba(8, 1, 3, 0.3);
  .info-title{
    width: 100%;
    text-align: center;
    font-size: 25px;
    letter-spacing: 1Px;
    line-height: 33px;
    color: #000;
    padding-bottom: 30px;
  }
  .info-content{
    position: relative;
    width: 100%;
    min-height: 160px;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    // box-sizing: border-box;
    // padding-left: $portrait-width;
    .content-portraitBlock{
      width: $portrait-width;
      .portraitBlock-wrap{
        width: 115px;
        height: 115px;
        border-radius: 100%;
        border: 1px solid #000;
        transform: rotate(0);
        overflow: hidden;
        margin-bottom: 15px;
      }
      p{
        width: 115px;
        text-align: center;
        font-size: 25px;
        line-height: 33px;
      }
    }
    .content-coachIntro{
      flex: 1;
      // width: 100%;
      font-size: 21px;
      line-height: 33px;
      color: #000;
      letter-spacing: 1Px;
      .ic-more{
        display: block;
        width: 100%;
        font-size: 30px;
        text-align: right;
        box-sizing: border-box;
        padding-right: 15px;
      }
    }
  }
  .info-action{
    margin-top: 10px;
    width: 100%;
    height: 35px;
    line-height: 35px;
    box-sizing: border-box;
    padding-left: $portrait-width;
    text-align: center;
    .ic-category-more{
      display: block;
      padding-right: 15px;
      font-size: 15px;
      color: $common-red;
      transform: rotate(-180deg);
    }
  }
}
</style>
